import request from '@/utils/request'

// 查询路书列表
export function listRoadbooks(query) {
  return request({
    url: '/work/roadbooks/list',
    method: 'get',
    params: query
  })
}

// 查询路书详细
export function getRoadbooks(id) {
  return request({
    url: '/work/roadbooks/' + id,
    method: 'get'
  })
}

// 新增路书
export function addRoadbooks(data) {
  return request({
    url: '/work/roadbooks',
    method: 'post',
    data: data
  })
}

// 修改路书
export function updateRoadbooks(data) {
  return request({
    url: '/work/roadbooks',
    method: 'put',
    data: data
  })
}

// 删除路书
export function delRoadbooks(id) {
  return request({
    url: '/work/roadbooks/' + id,
    method: 'delete'
  })
}

// 导入路书
export function importRoadbooks(data) {
  return request({
    url: '/work/test/import',
    method: 'post',
    data: data
  })
}
